package com.test.demo.feign;


import com.test.demo.dto.params.IconParam;
import com.test.demo.dto.params.PasswordParam;
import com.test.demo.dto.params.ProfileParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * Feign请求 个人信息controller
 * 增加了Fegin的全局配置
 *
 * @author 远 chards_
 * @date: 2020-02-19 15:00
 */
//没有做熔断请求
public interface ProfileFeign {

    /**
     * 获取用户信息
     * @param username
     * @return
     */
    @GetMapping(value = "profile/info/{username}")
    String info(@PathVariable String username);

    /**
     * 更新个人信息
     * @param profileParam
     * @return
     */
    @PostMapping(value = "update")
    String update(@RequestBody ProfileParam profileParam);


    /**
     * 修改密码
     *
     * @param passwordParam {@link PasswordParam}
     * @return {@code String} JSON
     */
    @PostMapping(value = "modify/password")
    String modifyPassword(@RequestBody PasswordParam passwordParam);

    /**
     * 修改头像
     * @param iconParam
     * @return
     */
    @PostMapping(value = "modifyIcon")
    String modifyIcon(IconParam iconParam);

}
